﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class WebServiceEvent : System.Web.UI.Page
{
localhost.WebService ws = new localhost.WebService();
protected void Page_Load(object sender, EventArgs e)
{
    ws.HelloWorldCompleted += new localhost.HelloWorldCompletedEventHandler(HelloWebService_HelloWorldCompleted);
    ws.HelloWorldAsync();
}

void HelloWebService_HelloWorldCompleted(object sender, localhost.HelloWorldCompletedEventArgs e)
{
    if (e.Error == null)
    {
        this.Label1.Text = e.Result;
    }
}
}